<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/javascript" http-equiv="content-script-type">
<title>tango.io.stream.MapStream</title>

<link rel="stylesheet" type="text/css" href="css/style.css">
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="css/ie56hack.css"><![endif]-->
<script language="JavaScript" src="js/util.js" type="text/javascript"></script>
<script language="JavaScript" src="js/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="js/explorer.js" type="text/javascript"></script>
<script>
function anchorFromTitle(title, path, ext) {
  var url = path + title + "." + ext;
  document.write("<a href='" + url + "'>" + title + "</a>");
  }
</script>
</head><body>
<div id="tabarea"></div><div id="explorerclient"></div>
<div id="content"><script>explorer.initialize("tango.io.stream.MapStream");</script>
        <table class="content">
                <tr><td id="docbody"><h1><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/stream/MapStream.d?rev=3327">tango.io.stream.MapStream</a></h1>
                
<b>License:</b><br>
BSD style: see <a href="http://www.dsource.org/projects/tango/wiki/LibraryLicense">license.txt</a><br><br>
<b>Version:</b><br>
Initial release: Oct 2007<br><br>
<b>author:</b><br>Kris<br><br>        Simple serialization for text-based name/value pairs<br><br>
<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>class <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/stream/MapStream.d?rev=3327#L31">MapInput</a></span>
<script>explorer.outline.addDecl('MapInput');</script>(T) : LineIterator!(T);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Provides load facilities for a properties stream. That is, a file
        or other medium containing lines of text with a name=value layout</font><br><br>
<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/stream/MapStream.d?rev=3327#L39">this</a></span>
<script>explorer.outline.addDecl('this');</script>(InputStream <span class="funcparam">stream</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Propagate ctor to superclass</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>int <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/stream/MapStream.d?rev=3327#L66">opApply</a></span>
<script>explorer.outline.addDecl('opApply');</script>(int delegate(ref T[] name, ref T[] value) <span class="funcparam">dg</span>); [final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Load properties from the provided stream, via a foreach.</font><br><br>
<font color="black">We use an iterator to sweep text lines, and extract lValue
                and rValue pairs from each one, The expected file format is
                as follows:<br><br>                <pre class="d_code">
<td><div class="compilerinfo">
<p class="error L">/home/aziz/tango/tango/io/stream/MapStream.d(6,17)L: expected 'line' after '#'.</p>
</div>
</td></tr><tr>
                <span class="i">x</span> = <span class="i">y</span>
                <span class="i">abc</span> = <span class="n">123</span>
                <span class="i">x</span>.<span class="i">y</span>.<span class="i">z</span> = <span class="k">this</span> <span class="k">is</span> <span class="i">a</span> <span class="i">single</span> <span class="i">property</span>

                <span class="hl">#</span> <span class="k">this</span> <span class="k">is</span> <span class="i">a</span> <span class="i">comment</span> <span class="i">line</span>
                
</pre><br><br>                Note that the provided name and value are actually slices
                and should be copied if you intend to retain them &#40;using
                name.dup and value.dup where appropriate&#41;<br><br></font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>MapInput <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/stream/MapStream.d?rev=3327#L99">load</a></span>
<script>explorer.outline.addDecl('load');</script>(ref T[][T[]] <span class="funcparam">properties</span>); [final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Load the input stream into an AA</font><br><br></dd></dl>
<script>explorer.outline.decSymbolLevel();</script></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>class <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/stream/MapStream.d?rev=3327#L116">MapOutput</a></span>
<script>explorer.outline.addDecl('MapOutput');</script>(T) : OutputFilter, Buffered;</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Provides write facilities on a properties stream. That is, a file
        or other medium which will contain lines of text with a name=value 
        layout</font><br><br>
<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/stream/MapStream.d?rev=3327#L133">this</a></span>
<script>explorer.outline.addDecl('this');</script>(OutputStream <span class="funcparam">stream</span>, T[] <span class="funcparam">newline</span> = NL);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Propagate ctor to superclass</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>IBuffer <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/stream/MapStream.d?rev=3327#L144">buffer</a></span>
<script>explorer.outline.addDecl('buffer');</script>(); [final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Buffered interface</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>MapOutput <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/stream/MapStream.d?rev=3327#L155">newline</a></span>
<script>explorer.outline.addDecl('newline');</script>(); [final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Append a newline to the provided stream</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>MapOutput <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/stream/MapStream.d?rev=3327#L167">comment</a></span>
<script>explorer.outline.addDecl('comment');</script>(T[] <span class="funcparam">text</span>); [final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Append a comment to the provided stream</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>MapOutput <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/stream/MapStream.d?rev=3327#L179">append</a></span>
<script>explorer.outline.addDecl('append');</script>(T[] <span class="funcparam">name</span>, T[] <span class="funcparam">value</span>); [final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Append name &amp; value to the provided stream</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>MapOutput <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/stream/MapStream.d?rev=3327#L191">append</a></span>
<script>explorer.outline.addDecl('append');</script>(T[][T[]] <span class="funcparam">properties</span>); [final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Append AA properties to the provided stream</font><br><br></dd></dl>
<script>explorer.outline.decSymbolLevel();</script></dd></dl>
<script>explorer.outline.decSymbolLevel();</script></td></tr>
                <tr><td id="docfooter">
                        Copyright (c) 2007 Kris Bell. All rights reserved :: page rendered by CandyDoc. Generated by <a href="http://code.google.com/p/dil">dil</a> on Tue Mar  4 22:45:33 2008.
                </td></tr>
        </table>
</div>
<script></script>
</body></html>